let arr = [1, 2, 3, 4 , 5, 6]

Array.prototype.my_filter = function (cb) {
    let newArr = []
    for (let i = 0;i < this.length; i++){

       const res = cb(this[i], i. this)
       if (res){
        newArr.push(this[i])
       }
        
       
        
    }
    return newArr
       
        
    
}



arr.filter((item, index, arr) => {
    return item > 3
})